package com.xing.util;

public class BrowseKeyUtils {
    //保存文章被浏览数量的key
    public static final String MAP_KEY_BROWSE_COUNT = "MAP_KEY_BROWSE_COUNT";
    //浏览时间限制5分钟
    public static final long  BROWSE_TIME =60*5;

    /**
     * 拼接用户ip和文章id作为key。格式 222222::333333
     * @param ip 用户ip
     * @param aid 文章id
     * @return
     */
    public static String getBrowseKey(String ip, String aid){
        StringBuilder builder = new StringBuilder();
        builder.append(ip);
        builder.append("::");
        builder.append(aid);
        return builder.toString();
    }
}
